Communication control method,communication system, print control apparatus, printing apparatus, host apparatus, periheral apparatus,and storage medium

ABSTRACT

A communication system for issuing commands from an initiator to a target, thereby allowing the target to write or read out data into/from a memory area which the initiator has and exchanging the data. The initiator transmits read and write commands for the memory area to the target so as not to exceed the total number of commands which can be held by the target. The target holds the received read and write commands, holds references to the commands by different queues, and independently processes the commands, so that the number of the commands to be transmitted can be managed efficiently.

BACKGROUND OF THE INVENTION

[0001] 1. Field of the Invention

[0002] The invention relates to communication control method and systemfor connecting equipment such as initiator (host computer) and target(printer or the like).

[0003] 2. Related Background Art

[0004] In recent years, the IEEE1394 interface is being used to connecta computer and peripheral equipment or connect both peripheralequipment. The IEEE1394 interface has a processing speed higher thanthat of the hand shaking system such as a centronics interface or thelike and can perform a bidirectional communication. The IEEE1394interface is also an interface for a memory bus model and equipmentconnected by it can read or write data at a designated address from/topartner's equipment.

[0005] According to IEEE1394, although a protocol for a physical layerand a link layer to apply it in a wide range is determined, a detailedprotocol for each equipment is not decided. Therefore, a protocol for atransport layer such as SBP (Serial Bus Protocol)-2 or the like usingIEEE1394 has been proposed as physical/link layers. The transport layeris a layer which provides a data transfer function for an application.The applications using such a layer can mutually exchange data.

[0006] The SBP-2 protocol is a protocol utilizing a feature as a memorybus model of IEEE1394, and the reception side of data can receive thedata in accordance with circumstances of itself. On the other hand, asprotocols other than SBP-2, there are a protocol which can transfer datawhich is asynchronously generated and a protocol which can realizemultichannels. However, such protocols cannot utilize the feature as amemory bus model of IEEE1394. That is, in case of a communicationbetween a host and a printer, data transfer cannot be performed inaccordance with circumstances on the printer side and the host has toperform the data transfer while monitoring a status of the printer.

[0007] According to SBP-2, in case of transferring data, an operationcalled “login” is first performed on the transmission side, therebyestablishing a channel with a communication partner. In this instance,the login side is called an initiator and the partner side connected tothe initiator is called a target. The data transfer is performed byreading or writing data from/into a buffer of the initiator from thetarget in accordance with an instruction from the initiator. In such asystem, the initiator forms an ORB (Operation Request Block) in which anaddress, a size, and the like of the buffer in which the data to betransmitted has been stored have been written and notifies the target ofthe address of the ORB. The target reads out or writes the data from/tothe initiator on the basis of the address and size written in the ORB inaccordance with its own circumstances, forms a status block aftercompletion of those processes, and notifies the initiator of states ofthe processes.

[0008] In case of performing a communication by using the SBP-2 protocolestablished on IEEE1394, particularly, in the case where a data sourcesuch as a host computer or the like is used as an initiator and it isapplied to a data transfer from the initiator to peripheral equipmentsuch as a printer apparatus or the like as a target, there are the fourfollowing problems.

[0009] (Problem 1) A procedure is complicated because of a full duplexcommunication.

[0010] In SBP-2, the data transfer is fundamentally managed by theinitiator and the target cannot perform the asynchronous data transferto the initiator. That is, in SBP-2, when the target wants to transferdata to the initiator, it sends a data reading request to the initiatorin an unsolicited status. The initiator forms an ORB in response to itand includes the formed ORB into the end of a list of the pending ORBs(a data transfer request from the initiator to the target and the likeare included). Since the ORBs are processed in order from the head, thedata is transferred from the target to the initiator for the first timewhen the process of the ORB on the initiator side is progressed and theORB processes in response to the data reading request from the targetinstead of a timing when the target issues the reading request to theinitiator. That is, in the case where the bidirectional asynchronousdata transfer cannot be performed and the data to be transferred fromthe target to the initiator is asynchronously generated, for example,assuming that the target is a printer, in the case where an error occursin the printer, or the like, the data to be transferred immediately tothe initiator cannot be momentarily transmitted.

[0011] Therefore, for example, to immediately send data which isasynchronously generated from the printer to the host, a login procedurehas to be performed by using the printer as an initiator and a datatransfer in which the host computer is used as a target has to beperformed.

[0012] In a situation such that the host computer and the printermutually login and each of them is the initiator or the target asmentioned above, a process as an initiator and a process as a targethave to be provided for both the host computer and the printer. Theoperation of login has to be also performed by the printer. In aperipheral apparatus such as a printer for handling an image, a largeamount of memory resources or processor resources are consumed for imageprocesses. Therefore, costs have to be shaved by simplifying aconstruction of the apparatuses or resources which are used forapplications other than the image processing application have to besaved as much as possible in order to perform the processes promptly.However, as mentioned above, the more often the processes are executed,the larger amount of resources are consumed. This is contrary to thepurpose of shaving costs and realization of a high efficiency ofprocesses.

[0013] As for the relation between the host computer and the printer,data flowing in each direction is correlated as a relation between printdata and a processing situation of it. However, if a channel is set byan independent login with respect to each direction, those data andresponse have to be mutually concerned and it is necessary to newly adda processing procedure for such a purpose.

[0014] As mentioned above, it is not proper to apply IEEE1394 and SBP-2to the communication between the host computer and the printer apparatusas they are. It is difficult to reduce the resources necessary for eachapparatus and improve the efficiency.

[0015] (Problem 2) Multichannels cannot be realized.

[0016] In recent years, a hybrid apparatus in which various functionsare combined as peripheral apparatuses is being used. For example, thereis a digital hybrid apparatus or the like such that a facsimileapparatus is used as a scanner unit apparatus, a printer unit apparatus,and a facsimile and can be used from the host computer or the like. Whensuch a hybrid apparatus is used, if a communication is performed througha plurality of independent channels every unit apparatus function, aplurality of functions can be simultaneously used.

[0017] In SBP-2, however, since the multichannels cannot be provided, itis difficult to simultaneously use such unit apparatus functions.

[0018] (Problem 3) It is impossible to cope with a bus reset.

[0019] In IEEE1394, a bus reset occurs when a status change whichbecomes a cause of a change of a network construction such that newequipment is connected to a 1394 serial bus or the equipment isdisconnected or a power source of the connected equipment is turned onor off occurs. The bus reset occurs when a node which detects the statuschange as mentioned above on the bus transmits a bus resetting signalonto the bus. The generated bus resetting signal is transmitted from onenode to another. When all nodes on the network receive the bus resettingsignal, a series of operations for the bus reset is performed in eachnode.

[0020] As mentioned above, the bus reset occurs asynchronously with theprocess in a node on a network. Even in case of a node which is notconcerned with a node which becomes a cause of the bus reset withrespect to the application, if the bus reset has once occurred, a busresetting process has to be performed. In the bus resetting step, in thenode which performs a communication by SBP-2, the set connection isdisconnected. Even if it is re-connected, a guarantee such that theprocess can be continued from the state just before the bus reset is notgiven.

[0021] Since the initiator transmits commands to the target so as not toexceed the number of commands in each queue, there is a case wherecommands assured in the queues which are not used are in vain.

SUMMARY OF THE INVENTION

[0022] The invention is made in consideration of the above conventionaltechnique and it is an object of the invention to provide communicationcontrol method and apparatus which enables a full duplex communication(mutually asynchronous bidirectional communication) and can efficientlyuse resources such as processes and memories necessary for exchangingdata and provide a printing apparatus using such method and apparatus.

[0023] Another object of the invention is to provide communicationcontrol method and apparatus which realize multichannels and provide aprinting apparatus using such method and apparatus.

[0024] Still another object of the invention is to provide communicationcontrol method and apparatus which guarantee the continuation ofprocesses from a state just before a bus reset even if the bus resetoccurs and provide a printing apparatus using such method and apparatus.

[0025] Further another object of the invention is to provide acommunication control method, a communication system, a print controlapparatus, a printing apparatus, a host apparatus, a peripheralapparatus, and a storage medium which can efficiently use resources byunitarily managing the number of commands which can be transmitted froman initiator to a target instead of managing it every queue of thetarget.

[0026] Further another object of the invention is to provide acommunication control method, a communication system, a print controlapparatus, a printing apparatus, a host apparatus, a peripheralapparatus, and a storage medium, in which an initiator dynamicallyperforms an allocation to all of command pool areas of a target in amultiplex path by queues, thereby improving a communicating efficiencyand a resource using efficiency of the target, and the number of commandpool areas of the target is increased or decreased in accordance withthe number of queues which are used for connection, thereby improvingthe resource using efficiency of the target.

[0027] To accomplish the above objects, according to the invention,there is provided a communication control method of issuing commandsfrom an initiator to a target, thereby allowing the target to write orread out data into/from a memory area which the initiator has andexchanging the data, wherein the initiator transmits read/write commandsfor the memory area to the target so as not to exceed the total numberof commands which can be held in the target, and the target holds thereceived read/write commands, holds references to the commands bydifferent queues, and individually processes them.

BRIEF DESCRIPTION OF THE DRAWINGS

[0028]FIG. 1 is a block diagram of a target (printer);

[0029]FIG. 2 is a block diagram of an initiator (host computer);

[0030]FIG. 3 is a flowchart for a processing procedure when a datatransfer request is generated by a client of the initiator;

[0031]FIG. 4 is a flowchart for a processing procedure when anend-of-process notice is received from SHPT-2 by the client of theinitiator;

[0032]FIGS. 5A, 5B and 5C are flowcharts for a write function and a readfunction which are executed by an SHPT-2 processor of the initiator andcalled from the client and a flowchart for a managing procedure of anI/O request queue which is executed by the SHPT-2 processor of theinitiator;

[0033]FIG. 6 is a flowchart for a processing procedure which is executedby the SHPT-2 processor of the initiator when a status block isreceived;

[0034]FIGS. 7A and 7B are diagrams showing a general format of an ORB;

[0035]FIG. 8 is a diagram showing a format of a write command ORB;

[0036]FIG. 9 is a diagram showing a format of a read command ORB;

[0037]FIG. 10 is a diagram showing a format of a connection command ORB;

[0038]FIG. 11 is a diagram showing a format of a disconnection commandORB;

[0039]FIG. 12 is a diagram showing a format of a query command ORB;

[0040]FIG. 13 is a diagram showing a general format of a status block;

[0041]FIG. 14 is a diagram showing a format of a connection statusblock;

[0042]FIG. 15 is a diagram showing a format of a query status block;

[0043]FIG. 16 is a flowchart for a processing procedure which isexecuted by the SHPT-2 processor of the initiator in response to anopening request from the client;

[0044]FIG. 17 is a flowchart for a processing procedure for a connectingrequest of the target;

[0045]FIG. 18 is a flowchart for a recovery processing procedure whichis executed by the SHPT-2 processor of the initiator just after a busreset;

[0046]FIG. 19 is a flowchart for a processing procedure which isexecuted by a fetch agent of the target when writing is performed to adoorbell register or an ORB pointer;

[0047]FIG. 20 is a flowchart for a processing procedure which isexecuted by an execution agent of the target;

[0048]FIG. 21 is a flowchart for a processing procedure which isexecuted by the SHPT-2 processor of the initiator in response to aclosing request from the client;

[0049]FIG. 22 is a flowchart for a processing procedure for adisconnecting request of the target;

[0050]FIG. 23 is a diagram showing a format of a disconnection commandORB according to the second embodiment;

[0051]FIG. 24 is a constructional diagram of hardware of a printersystem using the IEEE1394 interface; and

[0052]FIG. 25 is a diagram showing a format of a prefetch pool capacitychange command.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS First Embodiment

[0053] A printer system in which a host computer and a printer areconnected by IEEE1394 and an SBP-2 protocol constructed on IEEE1394 isused and a data transfer is performed in accordance with a protocol(hereinafter, referred to as SHPT-2) according to the invention will nowbe described as a first embodiment of the invention. FIG. 24 is aconstructional diagram of hardware in the printer system.

[0054] <Hardware Construction of System>

[0055] In FIG. 24, a host computer 200 has a CPU 1 for executingprocesses of a document in which a figure, an image, characters, a table(including a spreadsheet or the like), and the like mixedly exist on thebasis of a document processing program or the like stored in a programROM of an ROM 3. The CPU 1 integratedly controls each device connectedto a system bus 4. A control program and the like of the CPU 1 arestored in the program ROM of the ROM 3. Font data and the like which isused in the document process is stored in a font ROM of the ROM 3.Various data which is used when the document process or the like isexecuted is stored in a data ROM of the ROM 3. An RAM 2 functions as amain memory, a work area, or the like of the CPU 1.

[0056] The programs can be also stored in the RAM 2. A transmission databuffer or a system memory to store an ORB is assured in the RAM 2.

[0057] A keyboard controller (KBC) 5 controls a key input from akeyboard 9 or a pointing device (not shown). A CRT controller (CRTC) 6controls a display on a CRT display (CRT) 10. A memory controller (MC) 7controls an access to an external memory 11 such as hard disk (HD),floppy disk (FD), or the like to store a boot program, variousapplications, font data, a user file, an edit file, and the like. A 1394interface 8 is connected to a printer 100 and executes a communicationcontrol process of a communication with the printer 100 in accordancewith the IEEE1394 standard. For example, the CPU 1 executes a developing(rasterizing) process of an outline font into a display information RAMset on the RAM 2, thereby enabling WYSIWYG on the CRT 10. The CPU 1opens various registered windows on the basis of commands instructed bya mouse cursor or the like (not shown) on the CRT 10 and executesvarious data processes.

[0058] In the printer 100, a printer CPU 12 integratedly controlsaccesses to various devices connected to a system bus 15 on the basis ofa control program stored in a program ROM of an ROM 13, a controlprogram stored in an external memory 14, or the like, and outputs animage signal as output information to a printing unit (printer engine)17 connected through a printing unit interface (engine interface) 16.Various agents, which will be explained hereinlater, a control programfor the CPU 12 to realize image processes, and the like are stored inthe program ROM of the ROM 13. Font data and the like which are usedwhen the output information is formed are stored in a font ROM of theROM 13. In case of a printer without the external memory 14 such as ahard disk or the like, information and the like which are used on thehost computer are stored in a data ROM of the ROM 13. The CPU 12 canexecute a communicating process of a communication with the hostcomputer through a 1394 interface 18 and notify the host computer 200 ofinformation or the like in the printer.

[0059] An RAM 19 functions as a main memory, a work area, or the like ofthe CPU 12 and is constructed so that a memory capacity can be expandedby an option RAM which is connected to an expanding port (not shown).The RAM 19 is used as an output information rasterizing area, anenvironmental data memory area, an NVRAM, or the like. An access to theexternal memory 14 such as hard disk (HD), IC card, or the likementioned above is controlled by a memory controller (MC) 20. Theexternal memory 14 is connected as an option and stores font data, anemulation program, form data, and the like. Switches for operation, anLED display, and the like are arranged on an operation panel 1002. Thenumber of external memories is not limited to 1. The apparatus can bealso constructed in a manner such that at least one or more externalmemories are provided and an option font card in addition to built-infonts and a plurality of external memories in which programs tointerpret printer control languages of different language systems havebeen stored can be connected. Further, the apparatus can have an NVRAM(not shown) and store printer mode set information from the operationpanel 1002.

[0060] Although not shown, a finisher having a stapler function, asorter function, and the like can be also connected.

[0061] <Construction of Initiator>

[0062] In the foregoing hardware construction, FIGS. 1 and 2 showcommunication systems in which the printer 100 is used as a target andthe host computer 200 is used as an initiator. In the embodiment, thoseconstructions are realized by executing programs by CPUs in the hostcomputer and the printer, respectively. First, the initiator in FIG. 2will be described.

[0063] In FIG. 2, in the host computer as an initiator, a client 206such as a printer driver or the like issues a data transfer request fora printer through an SHPT-2 processor 201 and receives a response fromthe printer.

[0064] The SHPT-2 processor 201 manages I/O request queues and ORBswhich are formed in the system memory. The client 206 comprises one or aplurality of client processes. The I/O request command from each clientprocess is queued into each I/O request queue which is used forcommunication of each client process. Although four I/O request queuesare shown as an example in the diagram, the number of I/O request queuesis not limited to 4. The I/O request queue is dynamically prepared atthe time of a connection of a communication of each client process. Oneor a plurality of I/O request queues are used for communication of eachclient process.

[0065] In the example shown in the diagram, two I/O request queues 202 aand 202 b are used for communication of a client process 206 a. A writerequest command from the client process 206 a is queued into the I/Orequest queue 202 a. A read request command from the client process 206a is queued into the I/O request queue 202 b. A state where anasynchronous full duplex communication is performed by those two I/Orequest queues is shown. Similarly, an I/O request queue 202 c is usedfor communication of a client process 206 b. A write request command isqueued into the I/O request queue 202 c and a unidirectionalcommunication is performed. An I/O request queue 202 d is used forcommunication of a client process 206 c. A state where a synchronoussemi duplex communication is performed by queueing one or both of thewrite request command and read request command into the I/O requestqueue 202 d is shown.

[0066] ORB is a block in which an address, a size, and the like of adata buffer which are sent from the host computer as an initiator to theprinter as a target or from the printer to the host computer have beenstored. The blocks are sequentially linked to an ORB list 204 from thehead ORB. With respect to the ORB, there are the following processingrules.

[0067] (1) ORBs are formed in order from a command extracted from thehead of each I/O request queue and included to the end of the ORB list.The order of including the commands to the end of the ORB list is notparticularly limited. It is also possible to allocate a priority orderto each I/O request queue and allocate the command at the head of aspecific I/O request queue preferentially to the end of the ORB list.

[0068] (2) The ORBs are sequentially fetched from the head of the ORBlist. When a completion notice (status block) is received, the ORBcorresponding to the status is removed from the ORB list.

[0069] (3) The upper limit of the number of ORBs which are linked is thesame as a capacity (also including commands which are being processed aswell) of a prefetch pool in a target, which will be explainedhereinlater.

[0070] By the above items (1) and (2), it is guaranteed that the I/Orequest of each I/O request queue is issued to the target in generatingorder in each I/O request. By the above item (3), it is guaranteed thatthe I/O request in the ORB list is sent to the target. To realize theitem (3), the SHPT-2 processor 201 prepares one counter for each requestqueue and one counter for the prefetch pool, respectively.

[0071] A counter for each I/O request queue is a counter calledCurrent-QUE. In the example shown in the diagram, four Current-QUEcounters 203 a, 203 b, 203 c, and 203 d are shown for four I/O requestqueues. In each Current-QUE counter, the number of reserved areas in theprefetch pool allocated to the respective I/O request queues is held inthe denominator (right side). The number of commands (in the current ORBlist) belonging to the I/O request queue is held in the numerator (leftside).

[0072] The example in the diagram shows a state where the number ofreserved areas in the prefetch pool allocated to the I/O request queuesis equal to “1” and the numbers of commands (in the current ORB list)belonging to the I/O request queues 202 a, 202 b, 202 c, and 202 d areequal to “3”, “1”, “0”, and “2”, respectively.

[0073] A counter for the prefetch pool is a counter 203 e calledCurrent-POOL. The total number (“1+1+1+1”=“4”) of the numbers ofreserved areas in the I/O request queues is subtracted from the totalnumber “10” of areas in the prefetch pool and a resultant value “6” isset to the denominator (right side). This counter indicates the numberof free areas in the prefetch pool other than the reserved areasallocated to the I/O request queues.

[0074] The number “3” of areas which can be lent to the request queuesis set to the numerator (left side). Specifically speaking, among thevalues of the counters 203 a to 203 d in which the numerator is largerthan the denominator, in this case, the values of (the numerator−thedenominator), namely, (3−1=2, 2−1=1) of the counters 203 a and 203 d arecalculated. A value “3” obtained by adding “2” and “1” calculated fromthe number “6” of free areas in the prefetch pool other than thereserved areas allocated to the I/O request queues is subtracted from“6” of the denominator. A resultant value “3” is set to the numerator.

[0075] The example in the diagram shows a state where the number of freeareas in the prefetch pool other than the reserved areas allocated tothe I/O request queues is equal to “6”.

[0076] The total number of areas in the prefetch pool is held by theequipment as a target. This value is read out from the target at thetime of login or the like and stored into the initiator.

[0077] The example in the diagram shows a state where the total numberof areas in the prefetch pool is equal to “10”. The number (in thecurrent ORB list) in the Current-QUE counter associated with the I/Orequest queue is increased or decreased in accordance with the formationand deletion of the ORB.

[0078] Upon formation of the ORB, if the number (in the current ORBlist) in the Current-QUE counter does not exceed the number of reservedareas in the prefetch pool allocated to the I/O request queues at theinitial stage, the number in the Current-QUE counter is increased andthe ORB is added into the ORB list. Otherwise, a check is made to see ifthe number in the Current-POOL counter is equal to or larger than “1”.If it is equal to or larger than “1”, the number in the Current-POOLcounter is decreased, the number in the Current-QUE counter isincreased, and the ORB is added into the ORB list. If the number in theCurrent-POOL counter is already equal to “0”, the ORB is not added intothe ORB list.

[0079] Upon deletion of the ORB, when the number (in the current ORBlist) in the Current-QUE counter exceeds the number of reserved areas inthe prefetch pool allocated to the I/O request queues at the initialstage, the number in the Current-POOL counter is increased. In any case,the number (in the current ORB list) in the Current-QUE counter isreduced.

[0080] When the ORB is formed, a predetermined value is written into aregister called a doorbell register on the target side or the address ofthe ORB at the head of the list is written into a register called an ORBpointer, thereby notifying the target of the generation of the ORB. Ifthe ORB has already been added to the end of the ORB list which is beingexecuted by the target, the predetermined value is written into thedoorbell register. When the head ORB is newly formed in a state withoutan ORB list, the address is written into the ORB pointer. This procedureis specified in SBP-2.

[0081] The SHPT-2 processor 201 includes a status FIFO 205.

[0082] The status received through a 1394 interface 109 is processed bythe SHPT-2 processor 201. The SHPT-2 processor 201 removes the ORBcorresponding to the received status from the ORB list 204 and removesthe command corresponding to the removed ORB from the I/O request queue.

[0083] The host computer as an initiator has the functional constructionas mentioned above.

[0084] <Construction of Target>

[0085]FIG. 1 is a block diagram showing a functional construction of theprinter as a target. In FIG. 1, a doorbell register 101 a is a registerin which a value is written by the initiator and shows that the ORB hasnewly been formed. The address of the newly formed ORB is written intoan ORB pointer 101 b by the initiator. When the value is written intothe doorbell register 101 a, a fetch agent 101 reads out the ORB shownby the ORB pointer through the 1394 interface 109. An ORB dispatcher 102extracts a pointer from a free reference list 104, stores the command ofthe ORB read by the fetch agent 101 into free areas (Fr-1 to Fr-4) in aprefetch pool 103 shown by the pointer, and connects the pointer to theend of the reference queue in accordance with a “QueueID” field, whichwill be explained hereinlater, of the relevant ORB.

[0086] The example in the diagram shows a state where four referencequeues 105 a, 105 b, 105 c, and 105 d exist. The number of referencequeues is not limited to 4. The reference queues are dynamicallyprepared when a communication of each client process is connected. Oneor a plurality of reference queues are used for communication of eachclient process.

[0087] An execution agent 106 fetches the commands queued into eachreference queue from the head, performs the writing of data into thebuffer of the initiator, the reading of the data from the buffer of theinitiator, or the like in accordance with commands, and after that,returns a normal status to the host computer.

[0088] In the execution agent 106, one execution thread canindependently schedule and execute the processes for all of thereference queues so as not to be blocked by the processes of the otherreference queues, or the threads can be scheduled and executed byanother execution thread every reference queue. Or, a combination ofthose executing methods can be used. The execution agent 106 writes thedata into the buffer of the initiator designated by a read command inthe prefetch pool which is referred to by the reference queue 105 b inresponse to a data transfer request from a client process 108 a such asa rasterizer or the like for interpreting, for example, a PDL andforming raster data. Since the data transfer request is generatedasynchronously with a write command or a read command from theinitiator, the initiator always queues the read command into theprefetch pool which is referred to by the reference queue 105 b by theread command ORB. The target can send the data to the initiator any timeso long as the read command is queued in the prefetch pool which isreferred to by the reference queue 105 b. A bus interface 110 is aninterface for accessing from the printer 100 as a target to a desiredmemory location in a system memory 208 of the host computer 200 as aninitiator. The constructions and operations of the initiator and targethave been simply described above. The detailed contents of the ORB willbe first explained prior to describing them further in detail.

[0089] <Contents of Command ORB (Operation Request Block)>

[0090]FIGS. 7A and 7B are diagrams showing a general construction of theORB. In FIG. 7A, a “Next_ORB” (link) field 301 is a link to the nextORB.

[0091] When there is not the next ORB, a predetermined value showing theabsence of the next ORB is inserted. The head ORB is shown by apredetermined address register.

[0092] A “data_descriptor” field 302 shows an address in a data buffer.A “d” (direction) field 303 shows a data transfer (0: write) from thehost computer to the printer or a data transfer (1: read) from theprinter to the host computer. A “data_size” field 304 indicates a sizeof data buffer shown by the address field 302. The fields (alsoincluding fields which are not described yet) locating above a dottedline in the diagram are the fields specified by SBP-2 and fields 305 to308 which will be described from now on are fields which are used forprocesses peculiar to SHPT-2.

[0093] The “QueueID” field 305 indicates an ID of a reference queuewhich is used. The “function” field 306 indicates a kind of ORB as shownin FIG. 7B. OH indicates the write command. 4OH indicates the readcommand.

[0094] The “seq_ID” (sequence ID) field 308 indicates a sequentialidentifier which is allocated every reference queue in forming order ofthe ORBs. In the embodiment, the identifier is given so as to increaseeach time the ORB is formed.

[0095] After the “seq_ID” field increases to the maximum value, it isreturned to “0” in the next increase. A counter which gives a value tothe sequence ID field and serves as a reference is provided in a regionwhere it is not influenced by the bus reset or another obstacle. This isbecause the processes are performed in the target while increaseperformance of the sequence ID is used as a prerequisite. Various valuesare inputted into a control block field 309 in accordance with the valuein the function field 306 or a function which is realized by the targetfor each function. The address and size of the buffer are obtained atthe time of formation of the ORB from the command inputted in the I/Orequest queue.

[0096] The contents of the ORB will now be described every function.

[0097] (Write Command ORB)

[0098]FIG. 8 shows a write command ORB of a function=OH.

[0099] This command is a command to send the data in the designatedbuffer from the initiator to the target. A value in the function fieldis equal to “OH”. The “t” (tag) bit 307 shows a data tag.

[0100] (Read Command ORB)

[0101]FIG. 9 shows a read command ORB of the function=4OH.

[0102] This command is a command to read out the data from the target bythe initiator. A value in the function field is equal to 4OH.

[0103] (Connection Command ORB)

[0104]FIG. 10 shows a connection command ORB of the function=C1H. Thiscommand is issued for a reference queue for a connection service inwhich “QueueID”=0 and used to open a new connection and obtain an ID ofa reference queue which is used for such connection. An ID of a serviceof a new connection destination is designated in a “Service_ID” field309 a. Information indicating that to which one of the full duplexbidirection, unidirection, and semi duplex bidirection the connection isset is designated in a “Mode” field 309 b.

[0105] An “i” bit 309 e is set to 1 when the initiator requests anincrease in the prefetch pool to the target.

[0106] (Disconnection Command ORB)

[0107]FIG. 11 shows a disconnection command ORB of the function=C2H.This command is used to close the connection opened by the connectioncommand ORB. This command can be issued for the reference queue to beclosed or can be issued for a reference queue for a connection servicein which “QueueID”=0. When this command is issued for a reference queuefor a connection service in which “QueueID”=0, the connection for thereference queues designated by “QueueID1” field 309 c and “QueueID2”field 309 d is closed. When only one reference queue is used forconnection, 0 is designated in the “QueueID2” field.

[0108] (Query Command ORB)

[0109]FIG. 12 shows a query command ORB of the function=C0H. Thiscommand is used to get a capacity of the prefetch pool from the targetprior to the communication after the login.

[0110] (Status Block)

[0111]FIG. 13 shows a format and contents of a status which is returnedfrom the target to the initiator. In FIG. 13, since the fields locatingabove a dotted line are the fields specified by SBP-2, they are notdescribed in particular. A tag field 404 shows a data tag and is validonly in the status for the read command ORB.

[0112] “SHPT2_status1” and “SHPT2_status2” (SHPT-2 status) fields arefields showing an execution result status of the command ORB andindicate an error when they are other than 0. That is, when the value isequal to 0, this means that the processes with respect to the commandORB corresponding to such a status have been completed. For example,when the corresponding command ORB is the write command, this means thatas for the status block in which the SHPT-2 status is equal to 0, thetarget reads out all of the data from the buffer indicated by thecorresponding write command ORB and finishes the writing into the bufferwhich the target has. When the value is other than 0, this means that apart or all of the processes of the corresponding command ORB are notperformed due to the error. The initiator which received this errorcopes with the error by notifying the client of the occurrence of theerror, or the like.

[0113] A “residual” (remain) field 406 shows a residual data lengthexcluding a length of data processed for the buffer indicated by theORB.

[0114] (Connection Status Block)

[0115]FIG. 14 shows a status block for the connection command ORB of thefunction=C1H. This block is sent from the target to the initiator whenthe connection command is finished. The IDs of the reference queueswhich are used for new connection are shown in a “QueueID1” field 407 aand a “QueueID2” field 407 b. When a “Mode” field of the connectioncommand ORB indicates the unidirection, 0 is returned to “QueueID2”. Incase of the semi duplex, the same ID is returned to “QueueID1” and“QueueID2”. In case of the bidirection, different IDs are returned to“QueueID1” and “QueueID2”. A “POOL_Inc” field 407 c indicates anincrease amount of the capacity of the prefetch pool of the target.

[0116] (Query Status Block)

[0117]FIG. 15 is a status block for the query command ORB of thefunction=C0H. This block is sent from the target to the initiator whenthe query command is finished. The capacity of the prefetch pool of thetarget is returned to an “Init_POOL” field 407 d.

[0118] <Management of ORB>

[0119] How the ORB is used will now be described on the basis of theconstructions of the initiator and target described above and theconstructions of the command ORB and status block.

[0120] A flow of commands among the initiator, target, and clients willnow be described with reference to FIGS. 1 and 2. Explanation will nowbe made on the assumption that the request queue A 202 a and referencequeue A 105 a are used for the data transfer from the initiator side tothe target side and the request queue B 202 b and reference queue B 105b are used for the data transfer from the target side to the initiatorside.

[0121] When a data transfer request from the client of the initiator isissued, the client includes the write command including the address andsize of the buffer in which the data to be sent to the target has beenstored to the end of the I/O request queue A 202 a.

[0122] In the SHPT-2 processor 201, a check is made to see if the numberof commands (in the current ORB list) belonging to the I/O request queueshown by the Current-QUE counter 203 a is equal to or larger than thenumber of reserved areas in the prefetch pool allocated to the I/Orequest queue. If it is equal to or less than the number of reservedareas, an ORB is formed from the write command and linked to the end ofthe ORB list 204. The number of commands (in the current ORB list)belonging to the I/O request queue shown by the Current-QUE counter 203a is increased by 1. If the number in the ORB list is equal to or largerthan the number of reserved areas, the Current-POOL counter 203 e ischecked. If there is a free area, namely, if the count value of thecounter 203 e is not equal to 0, an ORB is formed from the write commandand linked to the end of the ORB list 204. The number of commands (inthe current ORB list) belonging to the I/O request queue shown by theCurrent-QUE counter 203 a is increased by 1 and the value of theCurrent-POOL counter is decreased by 1.

[0123] The Current-POOL counter 203 e is checked and if there is no freearea, the apparatus waits for the free area. In the state of FIG. 2,three ORBs have already been linked from the request queue A and thisnumber is larger than the number 1 of reserved areas. However, since thevalue of the Current-POOL counter is equal to 3, the value in theCurrent-POOL counter is reduced to 2 and the number in the ORB list ofthe Current-QUE counter is increased to 4. The ORB for a writing requestQa-4 which waited in the request queue can be added into the ORB list.Even if the ORB is formed, the write command corresponding thereto isnot deleted from the I/O request queue but deleted at a point when acompletion status is received from the target.

[0124] When the ORB is inserted into the ORB list, the SHPT-2 processor201 writes it into the doorbell register 101 a of the target through the1394 interface or writes an address of a new ORB into the ORB pointer101 b.

[0125] The dispatcher 102 extracts a pointer from the free referencelist 104, stores a command of the ORB into a free area in the prefetchpool 103 indicated by the pointer, and connects the pointer to the endof the reference queue in accordance with a QueueID field (in this case,it indicates the reference queue A 105 a) of the relevant ORB. Theexecution agent 106 sequentially executes the commands in the prefetchpool that is referred to by the reference queue. That is, the contentsin the buffer shown by the write command are written into the bufferprepared by the client of the target. When the process of the command iscompleted, the execution agent writes the status block in which theSHPT-2 status indicates “completion” into the status FIFO 205 of theinitiator.

[0126] The SHPT-2 processor 201 processes the status blocks written intothe status FIFO from the head. That is, if the SHPT-2 status indicates“completion”, the ORB corresponding to the status block is removed fromthe ORB list and, at the same time, the corresponding write command inthe I/O request queue is deleted. In this instance, a check is made tosee if the number of commands (in the current ORB list) belonging to theI/O request queue shown by the Current-QUE counter 203 a exceeds thenumber of reserved areas in the prefetch pool allocated to the I/Orequest queue. If NO, the number of commands (in the current ORB list)shown by the Current-QUE counter 203 a is reduced by 1. When the numberof commands in the ORB list exceeds the number of reserved areas, thecount value of the Current-POOL counter 203 e is increased by 1. Thenumber of commands (in the current ORB list) shown by the Current-QUEcounter 203 a is decreased by 1.

[0127] The above procedure is substantially similar to that of the readcommand. However, the read command is not processed so long as the datato be read out is not generated in the target. Therefore, the readcommand ORB issued from the initiator is stored into the prefetch pool103 and queued and held in the reference queue B 105 b until the data tobe read out is generated.

[0128] When the initiator is the host computer and the target is theprinter, to send the print data from the host computer to the printer,it is sent from a printer driver as a client of the initiator to therasterizer as a client of the target by using the write command. Whenthe host computer requests information showing the construction andstatus of the printer, a command (command at the client level)indicative of such a fact is transmitted as a write command to theprinter. The (client of the) printer which received the write commandsends the requested data to the host computer by using the read commandstored in the prefetch pool and queued in the reference queue. Further,in a case such that an error occurs in the printer, the client of theprinter can spontaneously send error information to the host computer byusing the read command stored in the prefetch pool and queued in thereference queue. Therefore, while the host computer is connected to theprinter, it issues at least one read ORB to the printer for the purposeof operation. Further, to always allow the read command to be stored inthe prefetch pool and queued in the reference queue, it is desirable toissue at least two read ORBs to the printer.

[0129] As for the ORB list 204 in FIG. 2, the ORBs are not alwayssequentially deleted from the head. For example, there is also a casewhere ORB T4 (command Qb-1) directed to the reference queue B 105 b iscompleted and deleted prior to ORB T3 (command Qa-2) directed to thereference queue A 105 a. Therefore, there is no link destination of ORBT3 (command Qa-2). In this case, since the pointers to ORB T3 (commandQa-2) and ORB T5 (command Qa-3) have already been sent to the target atthe time of processing of ORB T4 (command Qb-1), there is no need tore-connect the link destination on the ORB list. Even if the ORB list iscleared due to an error or the like, since the corresponding commandremains in the I/O request queue, an error recovering process, whichwill be explained hereinlater, can be also normally performed.

[0130] <Recovery (Initiator) of Error>

[0131] As already described above, in SBP-2, the connection between theinitiator and the target is disconnected by the bus reset due to anabnormality (error) on the network. Therefore, in SHPT-2, a procedure torecover the status lost by the bus reset is determined.

[0132] When the bus resetting process is finished after the bus resetoccurred due to an error or the like on the network, the initiatordeletes all of the ORBs from the ORB list in accordance with theregulations of SBP-2. Each I/O request queue is not reset even if thebus reset occurred.

[0133] After the connection is reset, the initiator newly forms an ORBfrom the contents of those queues with reference to the I/O requestqueue and issues it to the target. In this instance, by designatingagain the value in the “Seq_ID” field allocated to the correspondingcommand at the time of formation of the ORB, the status just before thebus reset can be reconstructed.

[0134] <Recovery (Target) of Error>

[0135] Although the initiator can return the status to the status justbefore the bus reset merely by recovering the:ORB list, since the targetperforms the reading/writing operation for the buffer in response to theread/write command, if the bus reset occurs during the reading/writingoperation, its procedure has to be continued after the recovery.Therefore, the execution agent of the target stores the “Seq_ID” fieldof the command which is referred to by each reference queue and is beingprocessed and the position in the buffer during the process everyreference queue.

[0136] For example, in the case where the initiator issues the read ORBand the target processes it by the execution agent, the execution agent106 reads out the “Seq_ID” field of the read command ORB which isprocessed from now on before the execution and stores it as a sequenceidentifier (Sequenceidentifier). When data is written into the buffer ofthe client, the address in the buffer in which data is being written atpresent is continuously updated as an execution pointer(Nextexecpointer). Those areas are assured in the memory area which isnot erased by the bus reset.

[0137] Since the initiator issues an ORB again after completion of thebus reset, if the “Seq_ID” field of the ORB which has been stored in theprefetch pool and is referred to at the head of the reference queue isolder than the stored sequence identifier, the process of this ORB hasalready been completed, so that the execution agent returns thecompletion status. If both of them coincide, the writing operation iscontinued from the address indicated by Nextexecpointer.

[0138] The recovery is also similarly performed with respect to thewrite command.

[0139] The command and status which are used in the printing system ofthe embodiment have been described above. A processing procedure of thecommand and status in the initiator and target will now be described.

[0140] <Data Transfer Request by Client of Initiator>

[0141]FIG. 3 shows a procedure when data is transmitted or requested tothe target from a printer driver or the like as a client of theinitiator.

[0142] When a data transmission event occurs (step S1301), whether thecommand which is necessary for it is the write command or the readcommand is discriminated (step S1302). If it is the write command,whether there is a data transfer buffer for it or not is discriminated(step S1303). Whether the transmission data to be sent to the target hasbeen prepared or not is discriminated (step S1304). If all of them havebeen prepared, the write command is formed by giving necessary argumentssuch as address, size, and the like of the buffer (step S1305). A writefunction is called (step S1306).

[0143] If it is determined that the necessary command is the readcommand, whether there is a transfer buffer to receive the data isdiscriminated (step S1307). If YES, the read command is formed bysending the necessary arguments such as address, size, and the like ofthe buffer (step S1308). The read function is called (step S1309).

[0144] For example, when the data transmission event is a transmissionof the print data to the printer, a command at the client level and datasuch as a PDL are prepared in the buffer and the write command isformed. If the data transmission event is the reading operation to readout the status from the printer, a command at the client levelindicative of such a fact is prepared and the write command is formed.At the same time, it is necessary to form the read command to receivedata from the target. Prior to performing a series of data exchange withthe target, the client of the initiator issues several read commands.

[0145]FIG. 4 shows a processing procedure when the client of theinitiator receives an end-of-process notice from a lower layer, namely,the layer of SHPT-2. First, whether the finished process is the readingprocess or the writing process is discriminated (step S1401). If it isthe writing process, the used data buffer is released (step S1402). Ifit is the reading process, since the end of the process denotes thecompletion of the data reception, the process corresponding to thereceived data is performed (step S1403). The data buffer is released(step S1404).

[0146] <Process by SHPT-2 Processor of Initiator>

[0147]FIGS. 5A to 5C and 6 show processing procedures by the SHPT-2processor of the initiator.

[0148]FIGS. 5A and 5B show the contents of a write function and a readfunction which are called by the client, respectively. In the writefunction, when the client issues a connecting request and is connected,a connection handle given by the SHPT-2 processor is sent as an argumentto the client, and on the basis of the ID of the I/O request queuecorresponding to the connection handle, the write command is added intothe I/O request queue. In the read function as well, in a manner similarto the above, when the client issues a connecting request and isconnected, the connection handle given by the SHPT-2 processor is sentas an argument to the client. On the basis of the ID of the I/O requestqueue corresponding to the connection handle, the read command is addedinto the I/O request queue. The commands queued in the I/O requestqueues respectively are, after that, sent to the reference queues shownby “QueueID1” and “QueueID2” given by the statuses of the connectioncommand on the target side, respectively.

[0149] (I/O Request Queue Management)

[0150]FIG. 5C shows a managing procedure of each I/O request queue.Those procedures can be independently performed by a thread schedule byone thread in each I/O request queue. Or, all of the I/O request queuescan be executed in a single thread by independently scheduling them in amanner such that the management of one I/O request queue is not blockedby the operations of the other I/O request queues. Or, a combination ofthose methods can be also used. FIG. 5C shows a management of one I/Orequest queue. The management of the I/O request queue is performedevery I/O request queue.

[0151] First, whether there is a non-ORB command in the I/O requestqueue or not is discriminated (step S1601). If YES, a check is made tosee if the count value of the Current-QUE counter showing the number ofcommands (in the current ORB list) belonging to the I/O request queue issmaller than the number of reserved areas in the prefetch pool allocatedto the I/O request queue (step S1602). If YES, step S1605 follows. Ifthe count value is equal to or larger than the number of reserved areas,step S1604 follows. In step S1604, the count value of the Current-POOLcounter is decreased by 1 if the count value of the Current-POOL counterfor the prefetch pool is larger than 0 (step S1603). Subsequently, 1 isadded to the count value of the Current-QUE counter (step S1605). An ORBis formed by adding the sequence ID (Seq ID) and SHPT-2 command(Function) on the basis of the non-ORB command at the head stored in theI/O request queue (step S1606).

[0152] The ORB formed in this manner is included into the ORB list (stepS1607) and written into the doorbell of the target or the address of theORB is written into the ORB pointer (step S1608). In this manner, theORB is formed from the command in the I/O request queue.

[0153] (Process for Status Block)

[0154]FIG. 6 shows a processing procedure when the status block isreceived from the target. When the status block of the processcompletion for the ORB is received, the corresponding ORB is deletedfrom the ORB list (step S1701). The I/O request queue in which thecommand for the corresponding ORB has been queued is selected (stepS1702). Whether the count value of the Current-QUE counter showing thenumber of commands (in the current ORB list) belonging to the selectedI/O request queue is equal to or less than the number of reserved areasin the prefetch pool allocated to the I/O request queue or not isdiscriminated (step S1703). If the count value is equal to or less thanthe number of reserved areas, step S1704 follows. If it is larger thanthe number of reserved areas, step S1705 follows. In step S1704, thecount value of the Current-POOL counter for the prefetch pool isincreased by 1. In step S1705, subsequently, the count value of theCurrent-QUE counter showing the number of commands (in the current ORBlist) belonging to the selected I/O request queue is decreased by 1.Finally, the end of process is notified to the client corresponding tothe selected I/O request queue (step S1706). The client receives thisnotice and executes the processes of FIG. 4.

[0155] (Error Recovering Process)

[0156] The ordinary processes in the SHPT-2 processor have beenmentioned above. A procedure for recovering after the bus reset or thelike will now be described with reference to FIG. 18. When the bus resetoccurs and the connection between the target and the SBP-2 connection isdisconnected, the connection of SBP-2 has to be newly reset.

[0157] First, a linking process of the new ORB is intermitted (stepS1801) and the ORB list is cancelled (step S1802). After that, are-connection command of the SBP-2 connection is issued (step S1803) andwhether the connection has been established or not is discriminated(step S1804). If the connection is established again, the correspondingORB is sequentially formed from the command at the head in each I/Orequest queue (step S1805). In this instance, the same ID as that addedto the command before the bus reset is given to the “Seq_ID” field ofeach ORB. The formed ORB is linked to the ORB list (step S1806). Theaddress is written into the ORB pointer (step S1807), thereby notifyingthe target of the generation of the ORB.

[0158] When a predetermined time elapses in a state where the connectioncannot be established again (step S1808), all of the commands in eachI/O request queue are cancelled (step S1809) and an error is informed tothe client (step S1810). The processing routine is finished. By theabove procedure, the SBP-2 connection with the target is newlyestablished after the reset and the ORB list just before the reset canbe recovered.

[0159] <Processes by Target>

[0160]FIGS. 19 and 20 show processing procedures by the target whichreceived the ORB.

[0161] (Processes by the Fetch Agent)

[0162] One fetch agent is prepared for one SBP-2 connection. The fetchagent fetches the ORB when the writing operation is performed to thedoorbell register or ORB pointer. First, the apparatus waits until thewriting operation is performed to the doorbell register or ORB pointer(step S1901). When it is done, a check is made to see if the apparatushas been activated by the writing to the doorbell register (step S1902).If the apparatus is activated by the writing to the ORB pointer insteadof the writing to the doorbell register, step S1903 follows. If thewriting is performed to the doorbell register, a test is made to see ifa “Next_ORB” field of the ORB designated by the ORB pointer is NULL(there is no subsequent ORB) (step S1907). If it is NULL, the processingroutine is returned to step S1901.

[0163] If it is not NULL, step S1908 follows and the value in the“Next_ORB” field of the ORB designated by the current ORB pointer iswritten into the ORB pointer and updated (step S1908). The processingroutine advances to step S1903.

[0164] If the address of the ORB to be processed is obtained in the ORBpointer as mentioned above, the ORB is read out from the address (stepS1903). The pointer indicating the free area in the prefetch pool istaken out from the free reference list and the read-out command ORB isstored into the free area (step S1905).

[0165] The reference queue in which the command should be queued isselected with reference to the “QueueID” field of the ORB (step S1905).The pointer extracted from the free reference list is queued to the endof the selected reference queue (step S1906).

[0166] After that, the “Next_ORB” field of the ORB in which the queueingprocess is finished is referred to and if its contents indicate NULL,namely, if there is not the linked ORB, the processing routine isreturned to step S1901, the next ORB is linked, and the apparatus waitsuntil the writing operation is performed to the doorbell register or ORBpointer. If there is the linked ORB, the value in the “Next_ORB” fieldof the ORB designated by the ORB pointer is written into the ORB pointerand updated (step S1908). The ORBs linked in the ORB list aresequentially stored into the prefetch pool.

[0167] In this manner, the ORBs in the ORB list are stored into theprefetch pool.

[0168] Processes in steps S1904 to S1906 are the same as those describedas an ORB dispatcher in FIG. 1.

[0169] (Execution Agent)

[0170]FIG. 20 shows a procedure of the execution agent for eachreference queue. Those procedures can be performed independently by athread schedule by one thread in each reference queue. Or, all of thereference queues can be executed in a single thread by independentlyscheduling them in a manner such that the management of one referencequeue is not blocked by the operations of the other reference queues.Or, a combination of those methods can be also used. FIG. 20 shows aprocedure of the execution agent for one reference queue. The procedureof the execution agent for each reference queue is performed everyreference queue.

[0171] The execution agent first discriminates whether the pointer tothe command in the prefetch pool exists in the reference queue or not(step S2001). The ORB is extracted from the prefetch pool (step S2002).The above processes are performed by using the pointer indicative of thehead of the reference queue. When the ORB is read out, a check is madeto see if the value in the “Seq_ID” field of the ORB is smaller than thevalue of a variable SequenceIdentifier held by the execution agent (stepS2003). Both Seq_ID and SequenceIdentifier are finite digit numbers.Therefore, when Seq_ID and SequenceIdentifier are expressed by n bits,in the comparison in step S2003, it is defined that((2^(n)−1)<0(=2^(n))).

[0172] In the ordinary sequence, 1 is added to SequenceIdentifier aftercompletion of the process of one ORB as will be explained hereinlater.SequenceIdentifier and Seq_ID of the ORB are set to the same digitnumber and Seq_ID is also added by 1 at a time. Therefore, when theprocess is progressing without a trouble, SequenceIdentifier and Seq_IDof the ORB ought to coincide in step S2003. Therefore, when the processnormally progresses, the processing routine is shifted from step S2003to step S2004.

[0173] Whether the buffer is ready in the client or not is discriminated(step S2004). If it is ready, the data of a predetermined size from theaddress in which the value of data_descriptor of the ORB and an offsetvalue stored in NextexecPointer held in the execution agent are added isaccessed. The data is transmitted and received to/from the bufferprepared by the client (step S2005).

[0174] In case of newly performing the process of the ORB, since theoffset value is equal to 0, data is read out from the head of the bufferindicated by the ORB. In case of subsequently reading out the bufferfrom the intermitted location in the buffer which has been read out tothe halfway, since the offset indicates the subsequent address in thebuffer, by adding it, the data can be continuously read out from theintermitted location in the buffer which has been read out to thehalfway. When the data is stored into the buffer, NextexecPointer isupdated in a manner such that (the value of data_descriptor+offset)indicates the address to be subsequently read out (step S2006). Suchreading/writing operations are performed until the size of data reachesthe size indicated by data_size of the ORB (step S2007).

[0175] When the processes of one ORB are finished, 1 is added toSequenceIdentifier and it is updated (step S2008). NextexecPointer(offset) is initialized to 0 (step S2009).

[0176] If the processing routine is finished, a status block to notifyof the completion of the processes is formed (step S2010) and writteninto the status FIFO (step S2011). The end of the process is notified tothe client of the target (step S2012). At the same time, the pointer inthe reference queue indicative of the relevant command is returned tothe free reference list.

[0177] The case where Seq_ID of the ORB is smaller thanSequenceIdentifier in step S2003 corresponds to the case such that theinitiator reproduces the ORB list by the procedure of FIG. 18 due to thebus reset or the like. For example, with respect to a certain ORB, evenif the target finished the processes and the value of SequenceIdentifierwas also updated, when the bus reset occurs at a point when its statusblock does not reach the initiator, the initiator also includes the ORBinto the ORB list. In this case, the value of SequenceIdentifier of theexecution agent is larger than Seq_ID of the ORB. In this case, sincethe processes of the ORB have already been finished, the status block issent to the initiator in step S2010 and subsequent steps.

[0178] <Connecting Procedure of Initiator>

[0179]FIG. 16 shows a processing procedure for an opening request fromthe client on the initiator side. When the opening request from theclient is received, a check is first made to see if the SBP-2 connection(login state) with the target of the connection destination has alreadybeen established (step S2501). If the SBP-2 connection has already beenestablished, step S2507 follows. If the SBP-2 connection is notestablished yet, a login request (SBP-2 connecting request) is issued tothe target (step S2502). Whether the login has succeeded or not isdiscriminated (step S2503). When the login fails, step S2513 follows, anerror code is set to a return value, and the processing routine isreturned. When the login succeeds, an I/O request queue in which QueueIDis equal to 0 is formed and a query command is issued thereto (stepS2504). Subsequently, whether the query command has succeeded or not isdiscriminated (step S2505). If it fails, step S2512 follows and a logoutis executed. After that, step S2513 follows. If the query commandsucceeds, the Current-POOL counter is set on the basis of “Init_POOL” ofthe status block for the query command. At this time, since the I/Orequest queue in which QueueID corresponds to 0 has already been tacitlyformed, one or more areas are set as reserved areas of the I/O requestqueue in which QueueID corresponds to 0 and the remaining areas are setinto the Current-POOL counter (step S2506).

[0180] Further, step S2507 follows and a desired ServiceID and Mode aredesignated for the I/O request queue in which QueueID corresponds to 0and the connection command is queued (step S2507). At the time ofconnection, “i” bit is set to 1 in case of obtaining an increase amountof the prefetch pool for the target. Whether the connection command hassucceeded or not is discriminated (step S2508). If it fails, a check ismade in step S2511 to see if another I/O request queue except for thequeue corresponding to QueueID0 which is tacitly prepared is alreadypresent. If it is absent, a logout from the target is performed, namely,SBP-2 is disconnected (step S2512) and step S2513 follows. If it ispresent, step S2513 follows without performing the logout. When theconnection command succeeds, a new I/O request queue is formed incorrespondence to QueueID1 and QueueID2 of the status block. After that,a handle for allowing the client to specify this connection is madecorrespond. One or more reserved areas are set for each queue on thebasis of the sum of the value in a Pool_Inc field of the status blockand the value in the current Current-POOL register and the value in theCurrent-POOL register is updated by the number of remaining areas (stepS2509). A handle which was made correspond to the I/O request queueformed finally is set to the return value (step S2510) and returned tothe client on the calling source side.

[0181] <Connecting Procedure of Target>

[0182]FIG. 17 shows a processing procedure on the target sidecorresponding to the processing procedure for the opening request fromthe client on the initiator side in FIG. 16.

[0183] The target first waits for the arrival of a login request (stepS2601).

[0184] When the login request is received, the target performs aconfirmation of the ID of the initiator, a formation of a logindescriptor, and the like as operations specified in SBP-2. The targetalso forms a prefetch pool having at least one entry and forms a freereference list as a list of the pointers for the entries in the prefetchpool. A pointer for the reference queue in which QueueID is equal to 0and the like are also prepared (step S2602). After completion of theabove preparation, the target returns a login response specified inSBP-2 to the initiator (step S2603). Subsequently, the target waits forthe arrival of the query command (step S2604). When the query command isreceived, a size of formed prefetch pool is added into the “Init_POOL”field and a status block in response to the query command is sent (stepS2605). The preparation for the communication by SHPT-2 can be made inthis manner.

[0185] A loop in step S2610 and subsequent steps relates to a processingprocedure of the execution agent based on the reference queue ofQueueID0. Whether the command is the connection command or not isdiscriminated in step S2606. If it is not the connection command, theprocesses of other commands are performed in step S2609. The processingroutine is returned to step S2610. If it is the connection command,pointers for one or two reference queues or the like are formed inaccordance with the mode designated in the Mode field. At this time, if“i” bit of the connection command is equal to 1, entries of the numberthat is equal to or larger than the number of formed reference queuesare added into the prefetch queue (step S2607). The IDs of the formedreference queues and the number of entries added into the prefetch queueare returned to the initiator by the status block for the connectioncommand (step S2608). The communication between the clients can beperformed by using the reference queues formed after that.

[0186] <Connection End Procedure of Initiator>

[0187]FIG. 21 shows a processing procedure for a closing request fromthe client on the initiator side. When the closing request is received,a disconnection command is first issued. When the user wants todisconnect after the command which has already been queued in the I/Orequest queue of relevant QueueID is finished, the “QueueID” field ofthe disconnection command is set to relevant QueueID0. When the userwants to disconnect irrespective of the queued command, thedisconnection command is issued to QueueID. In this case, a queue to bedisconnected is designated in the “QueueID1” and “QueueID2” fields (stepS2701). The apparatus subsequently waits for completion of thedisconnection command (step S2702). After completion of thedisconnection command, if the ORBs for the disconnected queues remain inthe current ORB list, all of them are invalidated by the control fieldspecified by SBP-2. The I/O request queue formed at the time ofconnection is released. The count value of the Current-POOL counter isincreased by a value corresponding to the number of ORBs in the currentORB list shown by the count value of the Current-QUE counter of the I/Orequest queue and is, further, reduced by a value corresponding to theincreased value in the prefetch pool received upon connection (stepS2703). A check is further made to see if another I/O request queueexcept for the queue of QueueID0 that is tacitly prepared is alreadypresent (step S2704). If it is absent, a logout from the target isperformed, namely, SBP-2 is disconnected (step S2705). The handleallocated upon connection is released. The processing routine isreturned.

[0188] <Connection End Procedure of Target>

[0189]FIG. 22 shows a disconnection processing procedure of the target.This procedure is located in step S2609 in FIG. 17. First, whether thecommand is the disconnection command or not is discriminated (stepS2801). If it is not the disconnection command, processes of othercommands are further performed (step S2807). If it is the disconnectioncommand, among the commands referred to by the reference queue servingas a target of the disconnection, if there is a command which is beingexecuted except for the disconnection command, the execution of such acommand is stopped (step S2802). After the execution is stopped, ifthere are status blocks which are not sent yet among the status blocksfor the commands other than the disconnection command referred to by thereference queue, all of them are sent (step S2803). After that, thestatus block in response to the disconnection command is returned (stepS2804). At this time point, all of the un-processed pointers remainingin the reference queue are returned to the free reference list (stepS2805). If the prefetch pool was increased upon connection, the addedamount is decreased and the pointers in the free reference list which isreferred to are deleted by the decreased amount. Further, the pointersor the like for the reference queues are also deleted (step S2806). Theprocessing routine is returned.

[0190] As shown in FIGS. 7A and 7B, a field of a queue identifier suchas QueueID is provided for the ORB. Therefore, the SHPT-2 processor andORB dispatcher identify the queue identifier and each of themindependently executes the process, namely, performs the formation andprocess of the ORB every queue, so that a multiconnection (channel) by aplurality of queues can be realized. In this case, even in one piece ofequipment, an asynchronous communication can be performed every clientby allocating one connection (channel) to each of a plurality of clientsincluded there.

[0191] Therefore, for example, in case of a digital hybrid apparatus, ifan application serving as a client is provided for each of the scannersand printers which the hybrid apparatus has, the hybrid apparatus can beused by the host computer connected thereto as if each function wereindependent equipment. As shown in the flowcharts, since the managementof each queue and the execution agent are logically independentprocesses, the multiconnection (channel) can be easily realized.

[0192] By using two queues which are identified by QueueID for oneconnection, a data exchange can be performed bidirectionally between theinitiator and the target by a simple control procedure. That is, theinitiator can send desired data to the target anytime. The target canread out the data sent from the initiator in accordance withcircumstances of the target itself. So long as the initiator isprepared, the target can send data to the initiator any timeirrespective of a spontaneous purpose or a request from the initiator.Even if the bus reset occurs, the continuation of the processes from theintermitted state just before the bus reset can be guaranteed.

[0193] Further, the initiator dynamically performs the allocation of thewhole command pool area of the target on the multiplex path by thequeue, so that a communicating efficiency and a resource usingefficiency of the target are improved. Since the command pool area ofthe target is increased or decreased in accordance with the number ofqueues which are used for connection, the resource using efficiency ofthe target is improved.

Other Embodiments

[0194] The invention can be applied to a system constructed by aplurality of equipment (for example, a host computer, interfaceequipment, a reader, a printer, and the like) or can be also applied toan apparatus (for example, a copying apparatus, a facsimile apparatus,or the like) comprising one piece of equipment.

[0195] As for the initiator, the object of the invention is alsoaccomplished by a method whereby a storage medium in which program codesof the procedures shown in FIGS. 3 to 6, 16, 18, and 21 have beenrecorded is supplied to a computer and the computer (or a CPU or an MPU)reads out and executes the program codes stored in the storage medium.As for the target as well, the object of the invention can be alsoaccomplished by a method whereby a storage medium in which program codesof the procedures shown in FIGS. 17, 19, 20, and 22 have been recordedis supplied to a computer and the computer (or a CPU or an MPU) readsout and executes the program codes stored in the storage medium.

[0196] In this case, the program codes themselves read out from thestorage medium realize the functions of the foregoing embodiment and thestorage medium in which the program codes have been stored constructsthe invention.

[0197] As a storage medium to supply the program codes, for example, afloppy disk, a hard disk, an optical disk, a magnetooptic disk, aCD-ROM, a CD-R, a magnetic tape, a non-volatile memory card, an ROM, orthe like can be used.

[0198] The invention incorporates not only a case where the functions ofthe embodiment mentioned above are realized by executing the read-outprogram codes by a computer but also a case where the functions of theembodiment mentioned above are realized by a method whereby the OS(Operating System) or the like which operates on the computer executes apart or all of the actual processes on the basis of instructions of theprogram codes and the functions of the embodiment mentioned above arerealized by those processes.

[0199] Further, the invention also incorporates a case where the programcodes read out from the storage medium are written into a memoryequipped for a function expanding board inserted into the computer or afunction expanding unit connected to the computer and, after that, a CPUor the like equipped for the function expanding board or functionexpanding unit executes a part or all of the actual processes on thebasis of instructions of the program codes, and the functions of theembodiment mentioned above are realized by those processes.

[0200] A main apparatus serving as an initiator by executing the programcodes read out from the storage medium is not limited to the computerbut any data transfer equipment can be used so long as it has a loginability of SBP-2.

[0201] As for the target, pipeline processes can be realized by using aplurality of reference queues, for example, by storing a print job intoa first reference queue, storing a read command to confirm a status ofthe target into a second queue, and storing a finisher control commandinto a third queue, and after completion of the printing based on aprint job, a next print job can be stored into the first reference queueprior to finishing the execution of the function by the finisher.

Second Embodiment

[0202] Although the first embodiment has been constructed in a mannersuch that the capacity of the prefetch pool upon disconnection isdecreased by the increased amount at the time of the correspondingconnection, the initiator can instruct the decrease amount upondisconnection. In this case, for the disconnection command ORB in FIG.11, a “POOL_Dec” field 309 f is provided and an amount of prefetch poolto be released to the target is designated in this field when theinitiator issues the disconnection command as shown in FIG. 23. Thecommand is issued in step S2701 in FIG. 21. The target decreases theprefetch pool by the amount designated by the “POOL_Dec” field in stepS2806 in FIG. 22.

[0203] Even in this embodiment, the following effects are obtained in amanner similar to the first embodiment. The SHPT-2 processor and ORBdispatcher identify the queue identifier and each of them independentlyexecutes the process, namely, performs the formation and process of theORB every queue, so that a multiconnection (channel) by a plurality ofqueues can be realized. In this case, even in one piece of equipment, anasynchronous communication can be performed every client by allocatingone connection (channel) to each of a plurality of clients includedtherein.

[0204] Therefore, for example, in case of a digital hybrid apparatus, ifan application serving as a client is provided for each of the scannersand printers which the hybrid apparatus has, the hybrid apparatus can beused by the host computer connected thereto as if each function wereindependent equipment. As shown in the flowcharts, since the managementof each queue and the execution agent are logically independentprocesses, the multiconnection (channel) can be easily realized.

[0205] By using two queues which are identified by QueueID for oneconnection, a data exchange can be performed bidirectionally between theinitiator and the target by a simple control procedure. That is, theinitiator can send desired data to the target anytime. The target canread out the data sent from the initiator in accordance withcircumstances of the target itself. So long as the initiator isprepared, the target can send data to the initiator any timeirrespective of a spontaneous purpose or a request from the initiator.Even if the bus reset occurs, the continuation of the processes from theintermitted state just before the bus reset can be guaranteed.

[0206] Further, the initiator dynamically performs the allocation of thewhole command pool area of the target on the multiplex path by thequeue, so that a communicating efficiency and a resource usingefficiency of the target are improved. Since the command pool area ofthe target is increased or decreased in accordance with the number ofqueues which are used for connection, the resource using efficiency ofthe target is improved.

Third Embodiment

[0207] Although the first embodiment has been constructed in a mannersuch that the initiator designates only a discrimination about whetherthe increase in the prefetch pool is requested or not by “i” bit in theconnection command, the initiator can also request the increase bydesignating the increase number. In this case, it is sufficient toincrease the number of bits in the “i” field in the connection commandin FIG. 10 and indicate the increase number. Further, although the firstembodiment has been constructed in a manner such that the reserved areascorresponding to the prefetch pool for the queue on the initiator sideare set only at the time of the connection, the reserved areas can bealso increased or decreased anytime other than the time of theconnection. In this case, the increased amount of the reserved areas isset so as not to exceed the value in the Current-POOL counter, thenumber of reserved areas is increased and the count value in theCurrent-POOL counter is decreased within such a range. To decrease it,when the number of ORBs (in the current ORB list) which is shown by thecount value in the Current-QUE counter and belongs to the relevant queueis lower than the number of reserved areas, the count value can bedecreased in a range such that a difference between the number of ORBsand the number of reserved areas is set to an upper limit and a range inwhich the number of reserved areas after the reduction is equal to orlarger than 1 in such a range. In this case, the number of reservedareas is reduced within such a range and the count value in theCurrent-POOL counter is increased.

[0208] Even in this embodiment, the following effects are obtained in amanner similar to those in the first embodiment. The SHPT-2 processorand ORB dispatcher identify the queue identifier and each of themindependently executes the process, namely, performs the formation andprocess of the ORB every queue, so that a multiconnection (channel) by aplurality of queues can be realized. In this case, even in one piece ofequipment, an asynchronous communication can be performed every clientby allocating one connection (channel) to each of a plurality of clientsincluded there.

[0209] Therefore, for example, in case of a digital hybrid apparatus, ifan application serving as a client is provided for each of the scannersand printers which the hybrid apparatus has, the hybrid apparatus can beused by the host computer connected thereto as if each function wereindependent equipment. As shown in the flowcharts, since the managementof each queue and the execution agent are logically independentprocesses, the multiconnection (channel) can be easily realized.

[0210] By using two queues which are identified by QueueID for oneconnection, a data exchange can be performed bidirectionally between theinitiator and the target by a simple control procedure. That is, theinitiator can send desired data to the target at any time. The targetcan read out the data sent from the initiator in accordance withcircumstances of the target itself. So long as the initiator isprepared, the target can send data to the initiator any timeirrespective of a spontaneous purpose or a request from the initiator.Even if the bus reset occurs, the continuation of the processes from theintermitted state just before the bus reset can be guaranteed.

[0211] Further, the initiator dynamically performs the allocation of thewhole command pool area of the target on the multiplex path by thequeue, so that a communicating efficiency and a resource usingefficiency of the target are improved. Since the command pool area ofthe target is increased or decreased in accordance with the number ofqueues which are used for connection, the resource using efficiency ofthe target is improved.

Fourth Embodiment

[0212] In the embodiment, although the increase or decrease of theprefetch pool is designated by the “i” bit 309 e of the connectioncommand (FIG. 10) and the disconnection command (FIG. 23), the“POOL_Dec” field, or the like or the value designated in the “POOL_Inc”field in the connection status (FIG. 14) is used, independent commandsfor increasing or decreasing the prefetch pool can be also provided inplace of them.

[0213]FIG. 25 shows a format of a prefetch pool capacity changingcommand (function code=C3H). In FIG. 25, a “delta” field 309 g shows anumerical value with a sign of a format of a complement of 2. If thisfield is positive, the increase in the prefetch pool is instructed tothe target. If it is negative, the decrease in the prefetch pool isinstructed to the target. The target actually increases or decreases theprefetch pool in response to the instruction of the command.

[0214] In case of using the command, when the opening request from theclient of the initiator is processed, if the increase in the prefetchpool is necessary, prior to step S2507 in FIG. 16, the initiator issuesa prefetch pool changing command, thereby increasing the prefetch pool.Since the target has already received the prefetch pool changing commandseparately if necessary before step S2607 in FIG. 17, only the pointersor the like for the reference queues are formed. When the closingrequest from the client of the initiator is processed, after thedisconnection command succeeds (step S2703), the prefetch pool capacitychanging command is issued, thereby reducing the prefetch pool. Sincethe prefetch pool capacity changing command ought to be issued from theinitiator later, in the process (FIG. 22) of the disconnection command,only the pointers or the like which are used for the reference queuesare deleted and the prefetch pool is not decreased in step S2806.

[0215] Even in this embodiment, the following effects are obtained in amanner similar to those in the first embodiment. The SHPT-2 processorand ORB dispatcher identify the queue identifier and each of themindependently executes the process, namely, performs the formation andprocess of the ORB every queue, so that a multiconnection (channel) by aplurality of queues,can be realized. In this case, even in one piece ofequipment, an asynchronous communication can be performed every clientby allocating one connection (channel) to each of a plurality of clientsincluded there.

[0216] Therefore, for example, in case of a digital hybrid apparatus, ifan application serving as a client is provided for each of the scannersand printers which the hybrid apparatus has, the hybrid apparatus can beused by the host computer connected thereto as if each function wereindependent equipment. As shown in the flowcharts, since the managementof each queue and the execution agent are logically independentprocesses, the multiconnection (channel) can be easily realized.

[0217] By using two queues which are identified by QueueID for oneconnection, a data exchange can be performed bidirectionally between theinitiator and the target by a simple control procedure. That is, theinitiator can send desired data to the target at any time. The targetcan read out the data sent from the initiator in accordance withcircumstances of the target itself. So long as the initiator isprepared, the target can send data to the initiator any timeirrespective of a spontaneous purpose or a request from the initiator.Even if the bus reset occurs, the continuation of the processes from theintermitted state just before the bus reset can be guaranteed.

[0218] Further, the initiator dynamically performs the allocation of thewhole command pool area of the target on the multiplex path by thequeue, so that a communicating efficiency and a resource usingefficiency of the target are improved. Since the command pool area ofthe target is increased or decreased in accordance with the number ofqueues which are used for connection, the resource using efficiency ofthe target is improved.

[0219] According to the invention as described above, an asynchronousbidirectional communication can be performed and its multichannel can berealized by one login between the initiator and the target and theresources such as processes and memory which are necessary for dataexchange can be efficiently used.

[0220] Since the IEEE1394 interface is used, in the data transfer to thetarget side, the target can read out the data in accordance with itscircumstances and a situation such that the initiator is occupied by thedata transfer due to the circumstances of the target can be prevented.

[0221] Since the SBP-2 protocol is used, only the ORB is queued in thetarget and the data itself which is actually transferred is stored inthe initiator for a process waiting period of time. Thus, a capacity ofthe memory resources of the target can be reduced.

[0222] By holding the latest processing state, even if the bus resetoccurs, the process can be restarted from the state just before the busreset after the bus reset, and the normal continuation of the processescan be guaranteed.

[0223] The number of commands which can be transmitted from theinitiator to the target is not managed every queue of the target but isunitarily managed, so that the resources can be efficiently used.

[0224] By dynamically allocating the whole command pool area of thetarget on the multiplex path due to the queues by the initiator, thecommunicating efficiency and the resource using efficiency of the targetare improved. The command pool areas of the target are increased ordecreased in accordance with the number of queues which are used forconnection. Thus, the resource using efficiency of the target can beimproved.

1. A communication control method of exchanging data between aninitiator and a target, comprising: a transmitting step of transmittinga read command and/or a write command from the initiator to the targetso as not to exceed a total number of commands which can be held in thetarget, each command including a designation indicating to which one ofa plurality of queues provided in the target the command corresponds; aholding step of holding, in the target, the transmitted read and/orwrite commands; a queuing step of queuing in the target, a reference toeach of the read and/or write commands held in the target into arespective one of the plurality of queues designated by the queuedesignation included in each command; and a performing step ofperforming, in the target, a read operation to read data from adesignated location in a memory area of the initiator in accordance withthe read command or a write operation to write data into a designatedlocation in the memory area of the initiator in accordance with thewrite command.
 2. A method according to claim 1, wherein saidtransmitting step transmits each command to the target by storing thecommand into the memory area of the initiator and reading out thecommand from the memory area by the target in accordance with aninstruction from the initiator.
 3. A method according to claim 1,wherein the total number of commands which can be held by the target isincreased in accordance with an increase in the number of the queues. 4.A method according to claim 3, wherein the total number of commandswhich can be held by the target is increased by a number that is equalto or larger than an increased number of queues.
 5. A method accordingto claim 1, wherein the total number of commands which can be held bythe target is increased in accordance with a command parameter of theinitiator.
 6. A method according to claim 1, wherein the total number ofcommands which can be held by the target is decreased in accordance witha decrease in the number of queues.
 7. A method according to claim 6,wherein the total number of commands which can be held by the target isincreased by an amount in accordance with an increase in the number ofqueues and wherein, at a time of the decrease in the number of queues,the total number of commands are decreased by the increased amount ofthe total number of commands.
 8. A method according to claim 6, whereinthe total number of commands which can be held by the target isdecreased in accordance with a command parameter of the initiator.
 9. Amethod according to claim 1, wherein said queuing step queues thereference to the read command into a first queue and the reference tothe write command into a second queue.
 10. (Cancelled)
 11. (Cancelled)12. A communication system for exchanging data between an initiator anda target, comprising: the initiator adapted to: transmit a read commandand/or a write command to the target so as not to exceed the totalnumber of commands which can be held in the target, each commandincluding a designation indicating to which one of a plurality of queuesprovided in the target the command corresponds; and the target adaptedto: hold the transmitted read and/or write commands; queue a referenceto each of the read and/or write commands held by said target into arespective one of the plurality of queues designated by the queuedesignation included in each command; and perform a read operation toread data from a designated location in a memory area of the initiatorin accordance with the read command or a write operation to write datainto a designated location in the memory area of the initiator inaccordance with the write command.
 13. A system according to claim 12,wherein the initiator is adapted to transmit a command to the target bystoring the commands into the memory area which the initiator has andreading out the commands from the memory area of the initiator by thetarget in accordance with an instruction of the initiator.
 14. A systemaccording to claim 12, wherein the total number of commands which can beheld by the target is increased in accordance with an increase in thenumber of queues.
 15. A system according to claim 14, wherein the totalnumber of commands which can be held by the target is increased by thenumber that is equal to or larger than the increased number of queues.16. A system according to claim 12, wherein the total number of commandswhich can be held by the target is increased in accordance with acommand parameter of the initiator.
 17. A system according to claim 12,wherein the total number of commands which can be held by the target isdecreased in accordance with a decrease in the number of queues.
 18. Asystem according to claim 17, wherein the total number of commands whichcan be held by the target is increased by an amount in accordance withan increase in the number of queues and wherein is, at a time of thedecrease in the number of queues, the total number of commands aredecreased by the increased amount of the total number of commands.
 19. Asystem according to claim 17, wherein the total number of commands whichcan be held by the target is decreased in accordance with a commandparameter of the initiator.
 20. A system according to claim 12, whereinthe target queues the reference to the read command into a first queueand the reference to the write command into a second queue.
 21. to 23.(Cancelled)
 24. A communication control method of exchanging databetween an initiator and a target, comprising: a command forming step offorming, in the initiator, a command including a designation indicatingto which one of a plurality of queues provided in the target the commandcorresponds; and a transmitting step of transmitting said the formedcommand from the initiator to the target so as not to exceed a totalnumber of commands which can be held in the target, wherein the targetholds the transmitted command, queues a reference to the command held bythe target into a respective one of the plurality of queues designatedby the queue designation included in the command, and performs a readoperation to read data from a designated location in a memory area ofthe initiator or a write operation to write data into a designatedlocation in the memory area of the initiator in accordance with thecommand referred to by the reference queued in the one queue. 25.(Cancelled)
 26. (Cancelled)
 27. A communication control method ofcontrolling a target that exchanges data with an initiator, comprising:a storing step of storing a command received from the initiator, thecommand including a designation indicating to which one of a pluralityof queues provided in the target the command corresponds; a queuing stepof registering reference data to refer to the command stored by saidstoring step into a respective one of the plurality of queues designatedby the queue designation included in the command; and an executing stepof executing a read operation to read data from a designated location ina memory area of the initiator or a write operation to write data into adesignated location in the memory area of the initiator in accordancewith the command referred to by the reference data registered in the onequeue.
 28. A method according to claim 27, further comprising: acapacity changing step of increasing or decreasing the total number ofcommands which can be stored in the target in accordance with anincreased or decreased number of queues; and a notifying step ofnotifying the initiator of an increased or decreased amount.
 29. Amethod according to claim 28, wherein in said changing step, the totalnumber of commands which can be held by the target is increased by anumber that is equal to or larger than the increased number of queues.30. A method according to claim 28, wherein in said changing step, thetotal number of commands which can be held by the target is increased inaccordance with a command parameter from the initiator.
 31. A methodaccording to claim 28, wherein in said changing step, the total numberof commands which can be held by the target is increased by an amount inaccordance with an increase in the number of queues, and wherein at atime of the decrease in the number of queues the total number ofcommands are decreased by the increased amount of the total number ofcommands.
 32. A method according to claim 28, wherein in said changingstep, the total number of commands which can be held by the target isdecreased in accordance with a command parameter of the initiator. 33.to
 44. (Cancelled)
 45. A method according to claim 9, wherein saidperforming step performs the read operation in accordance with the readcommand referred to by the reference queued in the first queue and thewrite operation in accordance with the write command referred to by thereference queued in the second queue.
 46. A method according to claim 1,further comprising a notifying step of notifying the initiator thatprocessing of a command is complete, after said performing step performsthe read operation or write operation in accordance with the command.47. A communication control apparatus exchanging data with an externalapparatus, said communication control apparatus comprising: a commandforming unit, adapted for forming a command including a designationindicating to which one of a plurality of queues provided in theexternal apparatus the command corresponds; and a transmitting unit,adapted for transmitting the command formed by said command forming unitto the external apparatus so as not to exceed the total number ofcommands which can be held by the external apparatus, wherein theexternal apparatus holds the command transmitted by said transmittingunit, queues a reference to the command held by the external apparatusinto a respective one of the plurality of queues designated by the queuedesignation included in the command, and performs a read operation toread data from a designated location in a memory area of saidcommunication control apparatus or a write operation to write data intoa designated location in the memory area in accordance with the commandreferred to by the reference queued in the one queue.
 48. An apparatusaccording to claim 47, further comprising a plurality of queues forholding a request from an application, wherein said command forming unitforms a read command or a write command in accordance with the requestheld in one of the plurality of queues, and the external apparatusperforms the read operation in accordance with the read command or thewrite operation in accordance with the write command.
 49. Acommunication control apparatus for exchanging data with an externalapparatus, said communication control apparatus comprising: a storingunit, adapted for storing a command received from the externalapparatus, the command including a designation indicating to which oneof a plurality of queues provided in said communication controlapparatus the command corresponds; a queuing unit, adapted forregistering reference data to refer to the command stored by saidstoring unit into a respective one of the plurality of queues designatedby the queue designation included in the command; and an executing unit,adapted for executing a read operation to read data from a designatedlocation in a memory area of the external apparatus or a write operationto write data into a designated location in the memory area inaccordance with the command referred to by the reference data registeredby said queuing unit in the one queue.